package com.cbb.display.service.impl;

import com.cbb.display.entity.TodayUserConfig;
import com.cbb.display.dao.TodayUserConfigMapper;
import com.cbb.display.service.TodayUserConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bigbomb
 * @since 2020-05-28
 */
@Service
public class TodayUserConfigServiceImpl extends ServiceImpl<TodayUserConfigMapper, TodayUserConfig> implements TodayUserConfigService {

    @Override
    public boolean addTodayUserConfig(List<TodayUserConfig> noidcollection, List<TodayUserConfig> idcollection) {
        boolean status = false;
        try {
            if(noidcollection.size()>0)
            {
                status = super.saveBatch(noidcollection);
            }
            if(idcollection.size()>0)
            {
                status = super.updateBatchById(idcollection);
            }
            return status;
        }catch (RuntimeException e) {
            // TODO: handle exception
            status = false;
            return status;
        }
        // TODO Auto-generated method stub

    }

}
